//
//  ResultViewController.m
//  Saoyisao_Test
//
//  Created by Adiljan on 2016/11/1.
//  Copyright © 2016年 Adiljan. All rights reserved.
//

#import "ResultViewController.h"

@interface ResultViewController ()

@end

@implementation ResultViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self initView];
}

-(void)initView{
    self.view.backgroundColor = [UIColor redColor];
    
    UILabel *lbl1 = [[UILabel alloc]initWithFrame:CGRectMake(0, 70, SCREEN_WIDTH, 30)];
    lbl1.text = self.strScan;
    [self.view addSubview:lbl1];
    UILabel *lbl2 = [[UILabel alloc]initWithFrame:CGRectMake(0, 100, SCREEN_WIDTH, 30)];
    lbl2.text = self.strCodeType;
    [self.view addSubview:lbl2];
    
    UIWebView *web = [[UIWebView alloc]initWithFrame:CGRectMake(0, 150, SCREEN_WIDTH, SCREEN_HEIGHT-150)];
    [self.view addSubview:web];
    
    NSString *strUrl = @"http://www.baidu.com";
    NSURL *url = [NSURL URLWithString:strUrl];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [web loadRequest:request];
    
//    NSURL *url = [NSURL URLWithString:urlStr];
//    
//    // 2. 把URL告诉给服务器,请求,从m.baidu.com请求数据
//    NSURLRequest *request = [NSURLRequest requestWithURL:url];
//    
//    // 3. 发送请求给服务器
//    [webView loadRequest:request];
    
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
